-- GENERATED SPELL FOR [Dark Rune Scholar] --


function spell0_27964(pUnit, Event) --@Runic Intellect,n/a--
pUnit:FullCastSpellOnTarget(51799,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27964', 589, 1)
end

function spell1_27964(pUnit, Event) --@Static Arrest,Self--
pUnit:FullCastSpellOnTarget(51612,pUnit)
pUnit:RegisterEvent('Sorts_27964', 6500, 1)
end

function spell2_27964(pUnit, Event) --@Static Arrest,Self--
pUnit:FullCastSpellOnTarget(59033,pUnit)
pUnit:RegisterEvent('Sorts_27964', 6500, 1)
end

function Sorts_27964(pUnit, Event)
local choix_sorts_27964 = math.random(0, 2)
if choix_sorts_27964 == 0 then
pUnit:RegisterEvent('spell0_27964', 1, 1)
end
if choix_sorts_27964 == 1 then
pUnit:RegisterEvent('spell1_27964', 1, 1)
end
if choix_sorts_27964 == 2 then
pUnit:RegisterEvent('spell2_27964', 1, 1)
end
end

function mob27964_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27964', math.random(1500, 3000), 1)
end

function mob27964_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27964_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27964_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27964, 1, 'mob27964_Action')
RegisterUnitEvent(27964, 2, 'mob27964_Leave')
RegisterUnitEvent(27964, 3, 'mob27964_Kill')
RegisterUnitEvent(27964, 4, 'mob27964_Die')
